/*     */ package com.cr.common.core.domain.entity;
/*     */ 
/*     */ import com.cr.common.annotation.Excel;
/*     */ import com.cr.common.annotation.Excels;
/*     */ import com.cr.common.core.domain.BaseEntity;
/*     */ import com.fasterxml.jackson.annotation.JsonIgnore;
/*     */ import java.util.Date;
/*     */ import java.util.List;
/*     */ import javax.validation.constraints.Email;
/*     */ import javax.validation.constraints.NotBlank;
/*     */ import javax.validation.constraints.Size;
/*     */ import org.apache.commons.lang3.builder.ToStringBuilder;
/*     */ import org.apache.commons.lang3.builder.ToStringStyle;
/*     */ 
/*     */ public class SysUser extends BaseEntity {
/*     */   private static final long serialVersionUID = 1L;
/*     */   
/*     */   @Excel(name = "用户序号", cellType = Excel.ColumnType.NUMERIC, prompt = "用户编号")
/*     */   private Long userId;
/*     */   
/*     */   @Excel(name = "部门编号", type = Excel.Type.IMPORT)
/*     */   private Long deptId;
/*     */   
/*     */   private Long parentId;
/*     */   
/*     */   private Long roleId;
/*     */   
/*     */   @Excel(name = "登录名称")
/*     */   private String loginName;
/*     */   
/*     */   @Excel(name = "用户名称")
/*     */   private String userName;
/*     */   
/*     */   private String userType;
/*     */   
/*     */   @Excel(name = "用户邮箱")
/*     */   private String email;
/*     */   
/*     */   @Excel(name = "手机号码")
/*     */   private String phonenumber;
/*     */   
/*     */   @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
/*     */   private String sex;
/*     */   
/*     */   private String avatar;
/*     */   
/*     */   private String password;
/*     */   
/*     */   private String salt;
/*     */   
/*     */   @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
/*     */   private String status;
/*     */   
/*     */   private String delFlag;
/*     */   
/*     */   @Excel(name = "最后登录IP", type = Excel.Type.EXPORT)
/*     */   private String loginIp;
/*     */   
/*     */   @Excel(name = "最后登录时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
/*     */   private Date loginDate;
/*     */   
/*     */   private Date pwdUpdateDate;
/*     */   
/*     */   @Excels({@Excel(name = "部门名称", targetAttr = "deptName", type = Excel.Type.EXPORT), @Excel(name = "部门负责人", targetAttr = "leader", type = Excel.Type.EXPORT)})
/*     */   private SysDept dept;
/*     */   
/*     */   private List<SysRole> roles;
/*     */   
/*     */   private Long[] roleIds;
/*     */   
/*     */   private Long[] postIds;
/*     */   
/*     */   public SysUser() {}
/*     */   
/*     */   public SysUser(Long userId) {
/* 110 */     this.userId = userId;
/*     */   }
/*     */   
/*     */   public Long getUserId() {
/* 115 */     return this.userId;
/*     */   }
/*     */   
/*     */   public void setUserId(Long userId) {
/* 120 */     this.userId = userId;
/*     */   }
/*     */   
/*     */   public boolean isAdmin() {
/* 125 */     return isAdmin(this.userId);
/*     */   }
/*     */   
/*     */   public static boolean isAdmin(Long userId) {
/* 130 */     return (userId != null && 1L == userId.longValue());
/*     */   }
/*     */   
/*     */   public Long getDeptId() {
/* 135 */     return this.deptId;
/*     */   }
/*     */   
/*     */   public void setDeptId(Long deptId) {
/* 140 */     this.deptId = deptId;
/*     */   }
/*     */   
/*     */   public Long getParentId() {
/* 145 */     return this.parentId;
/*     */   }
/*     */   
/*     */   public void setParentId(Long parentId) {
/* 150 */     this.parentId = parentId;
/*     */   }
/*     */   
/*     */   public Long getRoleId() {
/* 155 */     return this.roleId;
/*     */   }
/*     */   
/*     */   public void setRoleId(Long roleId) {
/* 160 */     this.roleId = roleId;
/*     */   }
/*     */   
/*     */   @NotBlank(message = "登录账号不能为空")
/*     */   @Size(min = 0, max = 30, message = "登录账号长度不能超过30个字符")
/*     */   public String getLoginName() {
/* 167 */     return this.loginName;
/*     */   }
/*     */   
/*     */   public void setLoginName(String loginName) {
/* 172 */     this.loginName = loginName;
/*     */   }
/*     */   
/*     */   @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
/*     */   public String getUserName() {
/* 178 */     return this.userName;
/*     */   }
/*     */   
/*     */   public void setUserName(String userName) {
/* 183 */     this.userName = userName;
/*     */   }
/*     */   
/*     */   public String getUserType() {
/* 188 */     return this.userType;
/*     */   }
/*     */   
/*     */   public void setUserType(String userType) {
/* 193 */     this.userType = userType;
/*     */   }
/*     */   
/*     */   @Email(message = "邮箱格式不正确")
/*     */   @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
/*     */   public String getEmail() {
/* 200 */     return this.email;
/*     */   }
/*     */   
/*     */   public void setEmail(String email) {
/* 205 */     this.email = email;
/*     */   }
/*     */   
/*     */   @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
/*     */   public String getPhonenumber() {
/* 211 */     return this.phonenumber;
/*     */   }
/*     */   
/*     */   public void setPhonenumber(String phonenumber) {
/* 216 */     this.phonenumber = phonenumber;
/*     */   }
/*     */   
/*     */   public String getSex() {
/* 221 */     return this.sex;
/*     */   }
/*     */   
/*     */   public void setSex(String sex) {
/* 226 */     this.sex = sex;
/*     */   }
/*     */   
/*     */   public String getAvatar() {
/* 231 */     return this.avatar;
/*     */   }
/*     */   
/*     */   public void setAvatar(String avatar) {
/* 236 */     this.avatar = avatar;
/*     */   }
/*     */   
/*     */   @JsonIgnore
/*     */   public String getPassword() {
/* 242 */     return this.password;
/*     */   }
/*     */   
/*     */   public void setPassword(String password) {
/* 247 */     this.password = password;
/*     */   }
/*     */   
/*     */   public String getSalt() {
/* 252 */     return this.salt;
/*     */   }
/*     */   
/*     */   public void setSalt(String salt) {
/* 257 */     this.salt = salt;
/*     */   }
/*     */   
/*     */   public String getStatus() {
/* 262 */     return this.status;
/*     */   }
/*     */   
/*     */   public void setStatus(String status) {
/* 267 */     this.status = status;
/*     */   }
/*     */   
/*     */   public String getDelFlag() {
/* 272 */     return this.delFlag;
/*     */   }
/*     */   
/*     */   public void setDelFlag(String delFlag) {
/* 277 */     this.delFlag = delFlag;
/*     */   }
/*     */   
/*     */   public String getLoginIp() {
/* 282 */     return this.loginIp;
/*     */   }
/*     */   
/*     */   public void setLoginIp(String loginIp) {
/* 287 */     this.loginIp = loginIp;
/*     */   }
/*     */   
/*     */   public Date getLoginDate() {
/* 292 */     return this.loginDate;
/*     */   }
/*     */   
/*     */   public void setLoginDate(Date loginDate) {
/* 297 */     this.loginDate = loginDate;
/*     */   }
/*     */   
/*     */   public Date getPwdUpdateDate() {
/* 302 */     return this.pwdUpdateDate;
/*     */   }
/*     */   
/*     */   public void setPwdUpdateDate(Date pwdUpdateDate) {
/* 307 */     this.pwdUpdateDate = pwdUpdateDate;
/*     */   }
/*     */   
/*     */   public SysDept getDept() {
/* 312 */     if (this.dept == null)
/* 314 */       this.dept = new SysDept(); 
/* 316 */     return this.dept;
/*     */   }
/*     */   
/*     */   public void setDept(SysDept dept) {
/* 321 */     this.dept = dept;
/*     */   }
/*     */   
/*     */   public List<SysRole> getRoles() {
/* 326 */     return this.roles;
/*     */   }
/*     */   
/*     */   public void setRoles(List<SysRole> roles) {
/* 331 */     this.roles = roles;
/*     */   }
/*     */   
/*     */   public Long[] getRoleIds() {
/* 336 */     return this.roleIds;
/*     */   }
/*     */   
/*     */   public void setRoleIds(Long[] roleIds) {
/* 341 */     this.roleIds = roleIds;
/*     */   }
/*     */   
/*     */   public Long[] getPostIds() {
/* 346 */     return this.postIds;
/*     */   }
/*     */   
/*     */   public void setPostIds(Long[] postIds) {
/* 351 */     this.postIds = postIds;
/*     */   }
/*     */   
/*     */   public String toString() {
/* 356 */     return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 357 */       .append("userId", getUserId())
/* 358 */       .append("deptId", getDeptId())
/* 359 */       .append("loginName", getLoginName())
/* 360 */       .append("userName", getUserName())
/* 361 */       .append("userType", getUserType())
/* 362 */       .append("email", getEmail())
/* 363 */       .append("phonenumber", getPhonenumber())
/* 364 */       .append("sex", getSex())
/* 365 */       .append("avatar", getAvatar())
/* 366 */       .append("password", getPassword())
/* 367 */       .append("salt", getSalt())
/* 368 */       .append("status", getStatus())
/* 369 */       .append("delFlag", getDelFlag())
/* 370 */       .append("loginIp", getLoginIp())
/* 371 */       .append("loginDate", getLoginDate())
/* 372 */       .append("createBy", getCreateBy())
/* 373 */       .append("createTime", getCreateTime())
/* 374 */       .append("updateBy", getUpdateBy())
/* 375 */       .append("updateTime", getUpdateTime())
/* 376 */       .append("remark", getRemark())
/* 377 */       .append("dept", getDept())
/* 378 */       .append("roles", getRoles())
/* 379 */       .toString();
/*     */   }
/*     */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\lib\creditorRights-common-4.7.0.jar!\com\cr\common\core\domain\entity\SysUser.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */